package org.ithang.application.grade.service;

import java.util.List;
import java.util.Map;
import org.ithang.application.grade.mapper.GradeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.apache.log4j.Logger;
import org.ithang.tools.model.Pager;
import org.ithang.tools.database.ModelDao;
import org.ithang.application.grade.bean.Grade;

/**
 * 分红档次 服务
 * @author zyt
 *
 */
@Service
public class GradeService extends ModelDao<Grade>{

    @Autowired
    private GradeMapper gradeMapper;

    private Logger logger = Logger.getLogger(GradeService.class);
    
    public void add(Grade grade){
        gradeMapper.add(grade);
    }
    
    public Grade get(Integer id){
        return gradeMapper.get(id);
    }
    
    public int delete(Integer id){
        return gradeMapper.delete(id);
    }
    
    public int batchDelete(String[] ids){
    	return gradeMapper.batchDelete(ids);
    }
    
    public List<Grade> list(Integer... ids){
    	return gradeMapper.list(ids);
    }
    
    public List<Grade> page(Pager<Grade> page){
    	return gradeMapper.page(page);
    }
    
    public List<Grade> query(Map<String,Object> conditions){
    	return gradeMapper.query(conditions);
    }
    
    public int update(Grade grade){
    	return gradeMapper.update(grade);
    }
    
    
}